/*
 * $Id: HandshakeBean.java,v 1.8 2009/10/13 16:04:58 afaichun Exp $
 * 
 * Copyright (C) 2008 General Electric Company. All Rights Reserved.
 * 
 * This software is the confidential and proprietary information of the General
 * Electric Company (GE). You shall not disclose this software and shall use it
 * only in accordance with the terms of the license agreement you entered into
 * with GE.
 * 
 * GE MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF THE
 * SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
 * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR
 * NON-INFRINGEMENT. GE SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE
 * AS A RESULT OF USING, MODIFYING, OR DISTRIBUTING THIS SOFTWARE OR ITS
 * DERIVATIVES.
 */
package com.ge.healthcare.autosc.onwatch.bean;

import com.ge.healthcare.autosc.common.ASCLogger;

/**
 * Java bean for Onwatch handshake request
 * @author 212042946
 *
 */
public class HandshakeBean extends BaseInfoBean {
	
	public static final long serialVersionUID = 0L;
	private String nextConnectTime = null;
	private String registration = null;

	public HandshakeBean() {
		super();
	}

	public String getNextConnectTimeInMin() {
		return nextConnectTime;
	}

	public Long getNextConnectTimeInLong() {
		Long nextConnectTimeInLong = null;
		if(nextConnectTime != null) {
			nextConnectTimeInLong =  new Long(nextConnectTime);
		}
		return nextConnectTimeInLong;
	}
	
	public void setNextConnectTimeInMin(String nextConnectTime) {
		this.nextConnectTime = nextConnectTime;
	}

	public String getRegistration() {
		return registration;
	}
	
	public boolean isRegistrationMode() {
		if("true".equalsIgnoreCase(registration)) {
			return true;
		}
		return false;
	}

	public void setRegistration(String registration) {
		this.registration = registration;
	}
	
	public String toString() {
		StringBuffer str = new StringBuffer();
		str.append(super.toString()).append(",");
		str.append("{nextConnectTimeInMin: ").append(getNextConnectTimeInMin()).append("},");
		str.append("{registration: ").append(this.getRegistration()).append("}");
		return str.toString();
	}
}
